package com.yonyou.brigade.rtpnr.service;

import com.alibaba.fastjson.JSONObject;
import com.yonyou.brigade.basic_init.model.BriChannel;
import com.yonyou.brigade.rtpnr.model.*;

public interface IRtpnrPublicService {
    /**
     * 创建员工
     * @return
     * {
     *     "LoginID": "yyts_1806131118003",
     *     "UserKey": "96400501faed4af29e8eb09e4ce08784",
     *     "ErrorMsg": "",
     *     "ErrorCode": "0"
     * }
     */
    public JSONObject createAccountInfo(String tenant,String orgpk,RtpnrUser rtpnrUser);

    /**
     * 修改员工信息
     * @param tenant
     * @param orgpk
     * @param updateAccountInfo
     * @return
     */
    public JSONObject updateAccountInfo(String tenant,String orgpk,UpdateAccountInfo updateAccountInfo);

    /**
     * 单点登录
     * @param judgeAccountByLoginID
     * @return
     * {
     *     "ErrorMsg": "该账号未激活，请登录PC端激活！",
     *     "JumpUrl": "",
     *     "Token": "",
     *     "ErrorCode": "6666"
     * }
     *
     * {
     *     "ErrorMsg": "",
     *     "JumpUrl": "http://qy.yeetm.com/VerifyLogin.aspx?UserKey=96400501faed4af29e8eb09e4ce08784&Token=dfe093b687bb4b28b6c023464b5907a6&FunCode=MenuFL01",
     *     "Token": "",
     *     "ErrorCode": "0"
     * }
     */
    public JSONObject ssoLogin(String tenant,String orgpk,JudgeAccountByLoginID judgeAccountByLoginID);

    /**
     * 自动审批接口
     * @param checkApprove
     * @return
     */
    public JSONObject autoApprove(String tenant,String orgpk,CheckApprove checkApprove);

    /**
     * 机票订单列表抓取
     * @param getFlightOrderList
     * @return
     * {
     *     "OrderList": [
     *         {
     *             "OrderTime": "2018-06-12 11:34:02",
     *             "PreiumReason": "陪同领导或客户",
     *             "CreateBy": "yongyoutest",
     *             "OrderNO": "1806121134654",
     *             "LastID": 269739,
     *             "IsDomc": "D",
     *             "OrderStatus": "NW",
     *             "PublicOrPriveate": 1,
     *             "StatusType": "N",
     *             "TripType": "OW",
     *             "YXDate": "",
     *             "PaymentPrice": 995,
     *             "SavePrice": ""
     *         }
     *     ]
     * }
     */
    public JSONObject getFlightOrderList(String tenant,String orgpk,GetFlightOrderList getFlightOrderList);

    /**
     * 获取机票订单详情
     * @param getFlightOrderDetail
     * @return
     * {
     *     "OrderInfo": {
     *         "Ordertype": "N",
     *         "IsAllowCheck": 0,
     *         "RefundPrice": 0,
     *         "SumCounterFee": 5,
     *         "CreateBy": "yongyoutest",
     *         "OrderNo": "1806121134654",
     *         "TPPrcie": 0,
     *         "DepName": null,
     *         "OrgName": null,
     *         "VerifyType": 2,
     *         "IsDomc": "D",
     *         "ParentOrderNo": null,
     *         "ContactPerson": {
     *             "ContactMobile": "15210040711",
     *             "ContactName": "用友测试"
     *         },
     *         "IsRuleOverSelfPay": null,
     *         "OrderStatus": "NW",
     *         "FlowBaseID": 0,
     *         "PublicOrPriveate": "1",
     *         "RefundMark": "",
     *         "SumInsMoney": 0,
     *         "RelatedNo": "",
     *         "IsPurchase": "N",
     *         "PaymentPrice": 995,
     *         "IsCheck": "N",
     *         "ApplyOrderNo": "",
     *         "IsAllowRefund": "N",
     *         "FarePrice": 930,
     *         "JsonOtherInfo": "[{\"key\":\"OA审批单号\",\"val\":\"\"}]",
     *         "PremiumReason": "陪同领导或客户",
     *         "AllowPayDate": "2018-06-12 12:04:02",
     *         "HsTitle": "官网",
     *         "HeadUserName": "",
     *         "RelatedType": "0",
     *         "ApprovalFlowStepList": [],
     *         "PlatformCode": null,
     *         "passengerInfo": [
     *             {
     *                 "InsMoney": 0,
     *                 "PsgSumInsMoney": 0,
     *                 "TicketStatus": "",
     *                 "PsgTPPrcie": 0,
     *                 "IsRuleOverSelfPay": null,
     *                 "PsgName": "YONG/YOUTEST",
     *                 "IsRuleOver": "N",
     *                 "CostCenter": "用友",
     *                 "CardType": "FOID",
     *                 "PsgRefundPrice": 0,
     *                 "CostCenterName": null,
     *                 "IsAllowRefund": "N",
     *                 "InsCount": 0,
     *                 "PurchaseBank": "",
     *                 "InsName": "保险",
     *                 "NOTravelRules": [],
     *                 "OAUserCode": "",
     *                 "CardNo": "G797987987",
     *                 "InsId": "",
     *                 "TPCounterFee": 0,
     *                 "IsAllowReschdule": null,
     *                 "UserId": null,
     *                 "CounterFee": 5,
     *                 "TicketNO": "",
     *                 "DepartmentName": "用友",
     *                 "PsgType": "ADT"
     *             }
     *         ],
     *         "CustomerOperateLogList": [],
     *         "FlightInfo": [
     *             {
     *                 "DepartureTime": "00:10",
     *                 "CarrierName": "南方航空",
     *                 "ArriveTime": "01:40",
     *                 "OffPoint": "DLC",
     *                 "ClassLevelName": "经济舱",
     *                 "OffPointName": "大连",
     *                 "OffPointAT": "   ",
     *                 "YPrice": "930.00",
     *                 "BoardPointAT": "T2 ",
     *                 "FlightNO": "CZ6132",
     *                 "Transit": null,
     *                 "BoardPointAirPortName": "北京首都国际机场",
     *                 "BoardPointName": "北京",
     *                 "TimeSpan": "1 小时 30 分钟",
     *                 "ClassCode": "Y ",
     *                 "ClassLevelCode": "E",
     *                 "ClassRebate": "100.00000000000000000000",
     *                 "BoardPoint": "PEK",
     *                 "DepartureDate": "2018-07-31",
     *                 "ArriveDate": "2018-07-31",
     *                 "Aircraft": "32G",
     *                 "OffPointAirPortName": "大连周水子国际机场",
     *                 "TGQ": "退票规定：航班预计离站时间前2小时（含）前,收取对应舱位公布运价5%退票费，航班预计离站时间前2小时(不含)后,收取对应舱位公布运价10%退票费¤改期规定：航班预计离站时间前2小时（含）前,变更费免费，航班预计离站时间前2小时(不含)后,收取对应舱位公布运价5%变更费¤签转规定：允许"
     *             }
     *         ],
     *         "PlatformName": null,
     *         "PurchaseCustName": "",
     *         "IsAllowReschdule": null,
     *         "TripType": "OW",
     *         "IsHS": "N",
     *         "PsgCount": 1,
     *         "PurchaseVerify": "",
     *         "TaxPrice": 60
     *     }
     * }
     */
    public JSONObject getFlightOrderDetail(String tenant,String orgpk,GetFlightOrderDetail getFlightOrderDetail);

    /**
     * 获取火车票订单列表
     *
     * @param getTrainOrderList
     * @return
     * {
     *     "code": "-10010",
     *     "loginID": "yongyoutest",
     *     "entID": "556",
     *     "methodName": "GetTrainOrderList_1_0",
     *     "callTime": "2018-06-14 09:56:56",
     *     "content": "未找到符合条件的结果"
     * }
     */
    public JSONObject getTrainOrderList(String tenant,String orgpk,GetTrainOrderList getTrainOrderList);

    /**
     * 获取火车票订单详情
     * @param getTrainOrderDetail
     * @return
     */
    public JSONObject getTrainOrderDetail(String tenant,String orgpk,GetTrainOrderDetail getTrainOrderDetail);

    /**
     * 获取酒店订单列表
     * @param getHotelOrderList
     * @return
     */
    public JSONObject getHotelOrderList(String tenant,String orgpk,GetHotelOrderList getHotelOrderList);

    /**
     * 获取酒店订单详情
     * @param getHotelOrderDetail
     * @return
     */
    public JSONObject getHotelOrderDetail(String tenant,String orgpk,GetHotelOrderDetail getHotelOrderDetail);

    /**
     * 获取租车订单列表
     *
     * @param getCarOrderList 条件
     * @param orgpk 组织PK
     * @param tenant 租户ID
     * @return <code>JsonObject</code>
     */
    JSONObject getCarOrderList(String tenant,String orgpk,GetCarOrderList getCarOrderList);

    /**
     * 获取租车订单详情
     *
     * @param tenant 租户ID
     * @param orgpk 组织PK
     * @param getCarOrderDetail 条件
     * @return <code>JsonObject</code>
     */
    JSONObject getCarOrderDetail(String tenant,String orgpk,GetCarOrderDetail getCarOrderDetail);


    /**
     * 同步出差申请单
     * @param tenant
     * @param orgpk
     * @param pushTravelApplyOrder
     * @return
     */
    public JSONObject pushTravelApplyOrder(String tenant,String orgpk,PushTravelApplyOrder pushTravelApplyOrder);

    /**
     * 获取出差类型接口
     * @param tenant
     * @param orgpk
     * @param getTravelCodeList
     * @return
     */
    public JSONObject getTravelCodeList(String tenant,String orgpk,GetTravelCodeList getTravelCodeList);

    /**
     * 获取行政区划接口
     * @param tenant
     * @param orgpk
     * @param getAdmdivCodeList
     * @return
     */
    public JSONObject getAdmdivCodeList(String tenant,String orgpk,GetAdmdivCodeList getAdmdivCodeList);

    /**
     * 同步出差申请单
     * @param channel
     * @param tenant
     * @param orgpk
     * @param applyOrderJson
     * @return
     */
     JSONObject pushApplayOrder(BriChannel channel, String tenant, String orgpk, JSONObject applyOrderJson);

    /**
     * 设置超标审批人接口
     * @param param
     * @return
     */
    JSONObject exceedStandardApproval(JSONObject param);
}
